package org.hzero.order.app.service;

import com.baidu.unbiz.fluentvalidator.ValidatorContext;
import com.baidu.unbiz.fluentvalidator.ValidatorHandler;
import org.hzero.boot.imported.infra.validator.annotation.ImportValidator;
import org.hzero.boot.imported.infra.validator.annotation.ImportValidators;


/**
 * @ Description   :  数据校验
 * @ Author        :  xiong.yilin@hand-china.com
 * @ CreateDate    :  2019/8/8 10:34
 */
@ImportValidators({
        @ImportValidator(templateCode = "ORA-25590-IMPORT")
})
public class ValidateDemo extends ValidatorHandler<String> {

    @Override
    public boolean validate(ValidatorContext context, String data) {
        System.out.println("数据校验：" + data);
        // do something
        return true;
    }
}
